//
// Copyright (c) 2024 BPer
//
#ifndef INCLUDE_BPERUTIL_SYS_BPERCSTRING_H_
#define INCLUDE_BPERUTIL_SYS_BPERCSTRING_H_

#include <bperutil/BPerType.h>

typedef struct {
    int32_t capacity;
    int32_t vsize;
    char **str;
}BPerStrings;

#ifdef __cplusplus
extern "C"{
#endif
void bPer_cint32_random(int32_t len,char* data);
void bPer_cstr_random(int32_t len,char* data);
int32_t bPer_cstr_split(char *src, char *delim, BPerStrings* istr);
void bPer_cstr_replace(char *str,char* dst, char *orig, char *rep);
void bPer_destroy_strings(BPerStrings* strs);
int32_t bPer_cstr_userfindindex(char* p,char c);
int32_t bPer_cstr_userfindupindex(char* p,char c,int32_t n);
int32_t bPer_cstr_isnumber(char* p,int32_t n);
int32_t bPer_bPer_strcmp(char* str1,char* str2);
void bPer_itoa(int32_t num,char* data,int32_t n);
void bPer_itoa2(uint32_t num,char* data,int32_t n);
int32_t bPer_get_line(char* buf,char *line, int32_t n);
#ifdef __cplusplus
}
#endif

#endif /* INCLUDE_BPERUTIL_SYS_BPERCSTRING_H_ */
